
package com.jiuqi.ccp.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for ccpQuartzJob.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="ccpQuartzJobForm"
 */
public class CcpQuartzJobForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _cqjGuid = null;
   private java.lang.String _jobName = null;
   private java.lang.String _springBean = null;
   private java.lang.String _methodName = null;
   private java.lang.String _javaMethod = null;
   private java.lang.String _jobRemark = null;
   private java.lang.String _groupGuid = null;

   /**
    * Standard constructor.
    */
   public CcpQuartzJobForm() {
   }

   /**
    * Returns the cqjGuid
    *
    * @return the cqjGuid
    */
   public java.lang.String getCqjGuid() {
      return _cqjGuid;
   }

   /**
    * Sets the cqjGuid
    *
    * @param cqjGuid the new cqjGuid value
    */
   public void setCqjGuid(java.lang.String cqjGuid) {
      _cqjGuid = cqjGuid;
   }
   /**
    * Returns the jobName
    *
    * @return the jobName
    */
   public java.lang.String getJobName() {
      return _jobName;
   }

   /**
    * Sets the jobName
    *
    * @param jobName the new jobName value
    */
   public void setJobName(java.lang.String jobName) {
      _jobName = jobName;
   }
   /**
    * Returns the springBean
    *
    * @return the springBean
    */
   public java.lang.String getSpringBean() {
      return _springBean;
   }

   /**
    * Sets the springBean
    *
    * @param springBean the new springBean value
    */
   public void setSpringBean(java.lang.String springBean) {
      _springBean = springBean;
   }
   /**
    * Returns the methodName
    *
    * @return the methodName
    */
   public java.lang.String getMethodName() {
      return _methodName;
   }

   /**
    * Sets the methodName
    *
    * @param methodName the new methodName value
    */
   public void setMethodName(java.lang.String methodName) {
      _methodName = methodName;
   }
   /**
    * Returns the javaMethod
    *
    * @return the javaMethod
    */
   public java.lang.String getJavaMethod() {
      return _javaMethod;
   }

   /**
    * Sets the javaMethod
    *
    * @param javaMethod the new javaMethod value
    */
   public void setJavaMethod(java.lang.String javaMethod) {
      _javaMethod = javaMethod;
   }
   /**
    * Returns the jobRemark
    *
    * @return the jobRemark
    */
   public java.lang.String getJobRemark() {
      return _jobRemark;
   }

   /**
    * Sets the jobRemark
    *
    * @param jobRemark the new jobRemark value
    */
   public void setJobRemark(java.lang.String jobRemark) {
      _jobRemark = jobRemark;
   }
   /**
    * Returns the groupGuid
    *
    * @return the groupGuid
    */
   public java.lang.String getGroupGuid() {
      return _groupGuid;
   }

   /**
    * Sets the groupGuid
    *
    * @param groupGuid the new groupGuid value
    */
   public void setGroupGuid(java.lang.String groupGuid) {
      _groupGuid = groupGuid;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getCqjGuid() == null) {
         errors.add("cqjGuid", new ActionError("error.cqjGuid.required"));
      }
      // TODO test format/data
      return errors;
   }
}
